package com.plian.system.enumeratea;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description:
 * @author: gangan
 * @create: 2021-01-11 13:48
 */
@Getter
@AllArgsConstructor
public enum FormTableEnum {

    //预算
    GSALARY_SLIP_FORM(1, "fr_report" , "UNIT", false, true,"YEAR"),
    
    //产权登记
    PM_PROPERTY_FORM(2, "pm_property" , "org_id", false, true,"update_time"),
    
    //产权变动
    PM_PROPERTYCHANGE_FORM(3, "pm_propertychange" , "org_id", false, true,"update_time"),

    //车辆更新
    FR_VEHICLEUPDATE_FORM(4, "fr_vehicle_update", "create_company_id", true, true,"update_time"),
    //车辆淘汰
    FR_VEHICLEELIMINATE_FORM(5, "fr_vehicle_scrap" , "create_company_id", true, true,"update_time"),
    //车辆租赁
    FR_VEHICLELEASE_FORM(6, "fr_vehicle_lease" , "create_company_id", true, true,"update_time"),
    //资产评估项目审理
    FR_ASSETEVALUATION_FORM(7, "fr_asset_evaluation_a" , "report_company_id", true, true,"update_time"),
    //资产评估项目核准与备案
    FR_EVALUATIONAPPROVAL_FORM(8, "fr_evaluation_approval" , "create_company_id", true, true,"update_time"),
    //内部机构管理
    FR_AUDITORGANIZATIONS_FORM(9, "fr_audit_organizations" , "company_name_id", true, true,"update_time"),
    //内审报告备案
    FR_AUDITREPORT_FORM(10, "fr_audit_report" , "company_name_id", true, true,"filling_year"),
    //子企业混合所有制改革进展
    QG_SUBSIDIARY_FORM(13, "qg_subsidiary_mixed_reform" , "mixed_enterprise_id", true, true,"update_time"),
    //产权注销
    PM_PROPERTYOUT_FORM(14, "pm_propertyout" , "org_id", false, true,"reporting_time"),
    //员工档案
    HR_STAFFFILES_FORM(15, "hr_staff_files" , "company_name_id", true, true,"update_time"),
    //企业年度捐赠计划备案
    PM_ANNUALDONATIONRECORD_FORM(16, "cqzc_annual_donation_record_main" , "report_company_id", true, true,"year"),
    //企业年度捐赠计划执行备案
    PM_ANNUALDONATIONEXECUTE_FORM(17, "cqzc_annual_donation_execute_main" , "report_company_id", true, true,"year"),
    //产权交易备案主表
    CQZC_PROPERTYTRANSACTION_FORM(18, "cqzc_property_transaction" , "report_company_id", true, true,"update_time"),
    //增资扩股交易备案主表
    CQZC_INVESTMENTU_PRECORD(19, "cqzc_investmentup_record" , "report_company_id", true, true,"update_time"),
    //企业担保申请主表
    QG_GUARANTEE_APPLY_FORM(20, "qg_property_guarantee_apply" , "apply_name_id", true, true,"update_time"),

    //企业担保执行主表
    QG_GUARANTEE_EXECUTE_FORM(21, "qg_property_guarantee_execute" , "apply_name_id", true, true,"update_time"),

    //股权（实物资产）转让进场交易信息公告
    CQZC_TRANSFER_EXAMINE(22, "cqzc_transfer_examine" , "report_company_id", true, true,"update_time"),

    //增资扩股进场交易公告审核a
    CQZC_INVESTMENTUP_NOTICE(23, "cqzc_investmentup_notice" , "financiers_id", true, true,"update_time"),

    //资产租赁公告审核主表
    CQZC_SSETLEASING_AUDIT(24, "cqzc_assetleasing_audit" , "report_company_id", true, true,"update_time"),
    //财务-企业信息
    FR_ENTERPRISE(25, "fr_enterprise" , "org_id", false, true,"update_time"),

    //任务下发
    MT_ASSIG_MAT(99, "" , "create_company_id", true, true,"update_time"),

    //董事会
    HR_DIRECTOR_FORM(9994, "hr_director" , "company_id", true, false,"update_time"),

    //监事会
    HR_SUPERVISOR_FORM(9995, "hr_supervisor" , "company_id", true, false,"update_time"),


    //因公出国（境）计划申报管理
    HR_ABROAD_DECLARATION_FORM(26, "hr_abroad_declaration" , "declaring_unit_id", true, true,"update_time"),

    //因公出国（境）管理
    HR_ABROAD_BUSINESS_FORM(27, "hr_abroad_business" , "declaring_unit_id", true, true,"update_time"),

    //因私出国（境）管理
    HR_ABROAD_PERSONAL_FORM(28, "hr_abroad_personal" , "declaring_unit_id", true, true,"update_time"),

    //企业用工管理
    HR_EMPLOYMENT_FORM(29, "hr_enterprise_employment" , "company_name_id", true, true,"update_time"),

    //招聘管理
    HR_RECRUITMENT_FORM(30, "hr_recruitment_management" , "company_name_id", true, true,"update_time"),

    //兼职管理
    HR_PART_TIME_FORM(31, "hr_part_time_management" , "company_id", true, true,"update_time"),

    //免职管理
    HR_REMOVAL_FORM(32, "hr_removal_management" , "company_id", true, true,"update_time"),

    //查处群众身边的不正之风和腐败问题情况
    DP_INVESTIGATE_UNHEALTHY_FORM(33, "dp_investigate_unhealthy" , "filling_unit_id", true, true,"filling_date"),

    //领导干部问责情况
    DP_LEADING_ACCOUNTABLE_FORM(34, "dp_leading_accountable" , "filling_unit_id", true, true,"filling_date"),

    //查处违反中央八项规定精神问题情况
    DP_INVESTIGATE_CENTRAL_COMMITTEE_FORM(35, "dp_investigate_central_committee" , "filling_unit_id", true, true,"filling_date"),

    //党内问责情况
    DP_PARTY_ACCOUNTABLE_FORM(36, "dp_party_accountable" , "filling_unit_id", true, true,"filling_date"),

    //生产安全事故问题
    DP_PRODUCTION_SAFETY_ACCIDENTS_FORM(37, "dp_production_safety_accidents" , "filling_unit_id", true, true,"filling_date"),

    //正风肃纪工作情况
    DP_UPRIGHT_DISCIPLINED_FORM(38, "dp_upright_disciplined" , "filling_unit_id", true, true,"filling_time"),

    //正风肃纪查处人员情况
    DP_DISCIPLINARY_PERSONNEL_FORM(39, "dp_disciplinary_personnel" , "filling_unit_id", true, true,"update_time"),

    //重大法律诉讼及仲裁案件管理
    LG_PROCEEDINGS_ARBITRATION_FORM(40, "lg_mlegal_proceedings_arbitration" , "filling_unit_id", true, true,"update_time"),

    //企业法律纠纷案件管理
    LG_LAW_DISPUTE_FORM(41, "lg_law_dispute" , "filling_unit_id", true, true,"update_time"),

    //企业纪检监察干部及监察对象人数
    DP_DISCIPLINE_STATISTICS_FORM(42, "dp_discipline_statistics" , "filling_unit_id", true, true,"update_time"),

    //护照管理
    HR_PASSPORT_MANAGEMENT_FORM(43, "hr_passport_management" , "company_name_id", true, true,"update_time"),

    //护照借出管理
    HR_PASSPORT_LEND_FORM(44, "hr_passport_lend" , "create_company_id", true, true,"update_time"),

    //护照归还管理
    HR_PASSPORT_RETURN_FORM(45, "hr_passport_return" , "create_company_id", true, true,"update_time"),

    //国企投资计划备案
    IM_PLAN_FILING_FORM(46, "im_plan_filing" , "filing_unit_id", true, true,"filing_year"),

    //投资计划填报
    IM_BASE_INVESTMENT_PLAN_FORM(47, "im_base_investment_plan" , "filing_unit_id", true, true,"filing_year"),

//    BT_HELP(48, "bt_help" , "create_company_id", false, false),
    //大宗物资采购
    FR_MATERIAL_PROCUREMENT_FORM(49, "fr_material_procurement" , "filling_unit_id", true, true,"filling_year"),

    //部门
    HR_DEPT(50, "hr_dept" , "dept_affiliation", true, true,"update_time"),

    //投资计划执行填报
    IM_BASE_INVESTMENT_EXECUTION_FORM(51, "im_base_investment_execution" , "filing_unit_id", true, true,"filing_month"),

    //国有企业投资项目债务余额及结构情况表（企业）
    IM_BASE_INVESTMENT_DEBT_FORM(63, "im_base_investment_debt" , "filing_unit_id", true, true,"filing_month"),
    //债务项目情况
//    IM_INVESTMENT_DEBT_INFO_FORM(67, "" , "create_company_id", true, true),
    //债券申请
    CQZC_BONDSAPPLY(60, "cqzc_bonds_apply" , "org_id", false, true,"update_time"),
    //债券发行
    CQZC_BONDISSUE(61, "cqzc_bond_issue" , "org_id", false, true,"update_time"),
    //债券偿还
    CQZC_BONDSREPAYMENT(62, "cqzc_bonds_repayment" , "org_id", false, true,"update_time"),
    //合伙人登记
//    PM_PARTNER(64, "" , "create_company_id", true, true),
    //合伙人变动
//    PM_PARTNER_CHANGE(65, "" , "create_company_id", true, true),
    //合伙人注销
//    PM_PARTNEROUT(66, "" , "create_company_id", true, true),

    // 业绩考核
    //经营业绩考核表
    PF_BASE_BUSINESS_INDICATORS(52, "pf_base_business_indicators" , "filling_unit_id", true, true,"filling_year"),
    //经营业绩月度考核表
    PF_BUSINESS_REPLENISH(53, "pf_business_replenish" , "filling_unit_id", true, true,"filling_month"),
    //职工福利费支出明细主表
    PF_BASE_WELFARE_EXPEND(54, "pf_base_welfare_expend" , "filling_unit_id", true, true,"filling_month"),
    // 职工工资发放主表_集团
    PF_BASE_GRANT_SALARY(55, "pf_base_grant_salary" , "filling_unit_id", true, true,"filling_month"),
    // 职工工资发放主表_子企业
    PF_BASE_CHILD_GRANT_SALARY(56, "pf_base_child_grant_salary" , "filling_unit_id", true, true,"filling_month"),
    // 市属企业工资总额本部职工明细表
    PF_BASE_SALARY_DETAIL(57, "pf_base_salary_detail" , "create_company_id", true, true,"filling_month"),

    //企业年度指标
    FR_YEARINDICATORS(90, "fr_year_indicators" , "org_id", false, true,"fyear"),
    //企业月度指标
    FR_MONTHINDICATORS(91, "fr_month_indicators" , "org_id", false, true,"fyear + fmonth"),

    //土地登记
    RA_LAND_ASSETS(101, "ra_landassets" , "org_id", false, true,"update_time"),
    //    房产登记
    RA_ESTATEREGISTRATION(102, "ra_estateregistration" , "org_id", false, true,"report_time"),
    //出租出借申请
    RA_LEAS_ASSETS_INFO(103, "ra_leasassetsinfo" , "org_id", false, true,"year"),
    //    房产分割（大厦）
    RA_REAL_ESTATE_DIVISION(104, "ra_realestatedivision" , "org_id", false, true,"update_time"),
    //    协议出租
    RA_AGREEMENT_RANT(105, "ra_agreementrent" , "org_id", false, true,"report_time"),
    //    出租合同终止
    RA_END_OF_CONTRACT(106, "ra_endofcontract" , "org_id", false, true,"report_time"),
    //    土地调整
    RA_LAND_VARIATION(107, "ra_landvariation" , "org_id", false, true,"report_time"),
    //    房产调整
    RA_ESTATE_VARIATION(108, "ra_estatevariation" , "org_id", false, true,"report_time"),
    //    土地处置注销
    RA_LAND_DISPOSAL(109, "ra_landdisposal" , "org_id", false, true,"report_time"),
    //    房产处置注销
    RA_ESTATE_DISPOSA(110, "ra_estatedisposal" , "org_id", false, true,"report_time"),
    //    出租合同备案
    RA_RECORD_LEASE_CONTRACT(111, "ra_recordleasecontract" , "org_id", false, true,"report_time"),
    // 不良资产核销事前备案
    CQZC_NPL_CANCEL_RECORD(115, "cqzc_investmentup_record" , "report_company_id", true, true,"update_time"),
    // 年度不良资产核销
    CQZC_NPL_CANCEL_MAINTAIN(116, "cqzc_nplcancelmaintain" , "org_id", false, true,"year"),


    // 自定义excel
    SYS_AUTO_EXCEL(117, "sys_excel" , "org_id", false, true,"report_time"),

    // 财务快报
    FR_BULLETIN(118, "fr_bulletin" , "org_id", false, true,"report_time"),

    // 企业年报
    FR_ANNUALREPORT(119, "fr_annualreport" , "org_id", false, true,"report_time"),

    // 全面预算调整表
    FR_BUDGET_ADJUSTMENT(120, "fr_budget_adjustment" , "unit", false, true,"YEAR"),

    // 工资总额预算调整表
    FR_PAYROLL_ADJUSTMENT(121, "fr_payroll_adjustment" , "unit", false, true,"YEAR"),

    //交办事项
//    MT_ASSIGMAT(220, "" , "create_company_id", true, true),

    //月度计划
    MS_MONTH_PLAN(130, "ms_month_plan" , "fill_company_id", true, true,"filling_month"),

    //季度监督检查报告
    MS_QUARTER_INSPECT(131, "ms_quarter_inspect" , "fill_company_id", true, true,"fill_year"),

    //日常事物报告
    MS_DAILY_THING(132, "ms_daily_thing" , "fill_company_id", true, true,"fill_date"),

    //问题情况表
    MS_ISSUE_SITUATION(133, "ms_issue_situation" , "fill_company_id", true, true,"fill_date"),

    //整改情况表
    MS_RECTIFICATION_SITUATION(134, "ms_rectification_situation" , "fill_company_id", true, true,"fill_date"),
    /**
     * 资金 活期账户
     */
//    FR_BANK_ACCOUNT(9983, "" , "create_company_id", true, true),

    /**
     * 资金 定期
     */
    FR_BANK_DEPOSIT(9982, "fr_bank_deposit" , "org_id", true, true,"update_time"),

    /**
     * 国资委制度
     */
//    SYS_SYSTEM(9981, "sys_system_record" , "create_company_id", true, true),

    //企业担保还款记录表
    QG_GUARANTEE_REPAYMENT_FORM(122, "qg_property_guarantee_repayment" , "create_company_id", true, true,"update_time"),

    //引入非市级国有资本
    QG_SUBSIDIARY_INTRODUCE_FORM(123, "qg_subsidiary_introduce_reform", "company_id", true, true,"update_time"),

    //监事会管理年度工作计划
    DP_ANNUAL_WORK_PLAN(135, "dp_annual_work_plan", "report_company_id", true, true,"update_time"),

    //监事会管理年度工作报告
    DP_ANNUAL_WORK_REPORK(136, "dp_annual_work_report", "report_company_id", true, true,"report_time"),

    //追责机构管理
    DP_DUTY_ORG(139, "dp_duty_organizations", "company_name_id", true, true,"update_time"),

    //责任追究年度工作计划
    DP_DUTY_ANNUAL_WORK_PLAN(137, "dp_duty_annual_work_plan", "report_company_id", true, true,"report_time"),

    //责任追究年度工作报告
    DP_DUTY_ANNUAL_WORK_REPORT(138, "dp_duty_annual_work_report", "report_company_id", true, true,"report_time"),

    //责任追究年度工作报告
    FR_BUDGET_AUTHORIZE(145, "fr_budget_authorize", "UNIT", true, true,"YEAR"),

    //不动产登记
    PM_REAL_PROPERTY(141, "pm_real_property", "filling_unit_id", true, true,"update_time"),

    //市属企业负责人薪酬发放表
    PF_LEADER_SALARY(140, "pf_base_leader_salary_detail", "filling_unit_id", true, true,"filling_month");

    private final Integer formType;

    private final String tableName;

    private final String orgColumnName;

    private final boolean isHaveDeleted;

    private final boolean isHaveStatus;

    private final String dateTableName;

    public static FormTableEnum getByFormType(Integer formType){
        if (null == formType){
            return null;
        }

        for (FormTableEnum value : FormTableEnum.values()){
            if (formType.equals(value.formType)){
                return value;
            }
        }

        return null;
    }
}
